﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BusinessLogic
{
    public abstract class FormattedCodeTable : CodeTable
    {
        private string _abbreviation;

        [SQLParameter(ColumnName = "STATEABBREVIATION", SQLDoWhat = SQLDoWhatEnum.Get, TypeOf = typeof(State))]
        [SQLParameter(ColumnName = "COUNTRYABBREVIATION", SQLDoWhat = SQLDoWhatEnum.Get, TypeOf = typeof(Country))]
        [SQLParameter(ParameterName = "@ABBREVIATION", SQLDoWhat = SQLDoWhatEnum.Create)]
        public string Abbreviation
        {
            get 
            { 
                return _abbreviation;
            }
            set
            {
                this._abbreviation = value; 
            }
        }

        public FormattedCodeTable() : base() { }
        public FormattedCodeTable(Guid id) : base(id) { }

        //specific formatted code tables will override this
        public override abstract DatabaseInteractionDescriptor TableInteractionDescription();
    }
}